package com.lekang.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lekang.common.annotation.Excel;
import com.lekang.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 退住管理对象 check_out_management
 *
 * @author chengbingzhen
 * @date 2025-10-15
 */
public class CheckOutManagement extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Excel(name = "主键ID")
    private Long id;

    /**
     * 退住单号
     */
    @Excel(name = "退住单号")
    private String checkOutNo;

    /**
     * 老人外键编号
     */
    @Excel(name = "老人外键编号")
    private Long elderlyId;

    /**
     * 入住管理外键
     */
    private Long checkInManagementId;

    /**
     * 床位外键编号
     */
    private Long bedId;

    /**
     * 退住日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退住日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkOutDate;

    /**
     * 退住原因
     */
    private String checkOutReason;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private Long creator;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 逻辑删除
     */
    private Long isDeleted;

    /**
     * 业务ID
     */
    private String businessId;

    /**
     * 额外字段1
     */
    private Long extraField1;

    /**
     * 额外字段2
     */
    private String extraField2;

    // 添加老人相关联字段
    @Excel(name = "老人姓名")
    private String elderlyName;

    @Excel(name = "身份证号")
    private String elderlyIdCard;

    // 添加创建人昵称
    @Excel(name = "创建人昵称")
    private String creatorNickName;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setCheckOutNo(String checkOutNo) {
        this.checkOutNo = checkOutNo;
    }

    public String getCheckOutNo() {
        return checkOutNo;
    }

    public void setElderlyId(Long elderlyId) {
        this.elderlyId = elderlyId;
    }

    public Long getElderlyId() {
        return elderlyId;
    }

    public void setCheckInManagementId(Long checkInManagementId) {
        this.checkInManagementId = checkInManagementId;
    }

    public Long getCheckInManagementId() {
        return checkInManagementId;
    }

    public void setBedId(Long bedId) {
        this.bedId = bedId;
    }

    public Long getBedId() {
        return bedId;
    }

    public void setCheckOutDate(Date checkOutDate) {
        this.checkOutDate = checkOutDate;
    }

    public Date getCheckOutDate() {
        return checkOutDate;
    }

    public void setCheckOutReason(String checkOutReason) {
        this.checkOutReason = checkOutReason;
    }

    public String getCheckOutReason() {
        return checkOutReason;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    public Long getCreator() {
        return creator;
    }

    public void setIsDeleted(Long isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Long getIsDeleted() {
        return isDeleted;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setExtraField1(String extraField1) {
        this.extraField1 = Long.parseLong(extraField1);
    }

    public Long getExtraField1() {
        return extraField1;
    }

    public void setExtraField2(String extraField2) {
        this.extraField2 = extraField2;
    }

    public String getExtraField2() {
        return extraField2;
    }

    public String getElderlyName() {
        return elderlyName;
    }

    public void setElderlyName(String elderlyName) {
        this.elderlyName = elderlyName;
    }

    public String getElderlyIdCard() {
        return elderlyIdCard;
    }

    public void setElderlyIdCard(String elderlyIdCard) {
        this.elderlyIdCard = elderlyIdCard;
    }

    public String getCreatorNickName() {
        return creatorNickName;
    }

    public void setCreatorNickName(String creatorNickName) {
        this.creatorNickName = creatorNickName;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("checkOutNo", getCheckOutNo())
                .append("elderlyId", getElderlyId())
                .append("checkInManagementId", getCheckInManagementId())
                .append("bedId", getBedId())
                .append("checkOutDate", getCheckOutDate())
                .append("checkOutReason", getCheckOutReason())
                .append("remark", getRemark())
                .append("creator", getCreator())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("isDeleted", getIsDeleted())
                .append("businessId", getBusinessId())
                .append("extraField1", getExtraField1())
                .append("extraField2", getExtraField2())
                .toString();
    }
}
